<template>
   <el-row>
        <el-col :span="8"></el-col>
        <el-col :span="8">911管理平台</el-col>
        <el-col :span="8" style="text-align: end;">
            <el-button-group class="ml-4">
                <el-button color="#626aef" plain  >
                    <el-icon><Edit /></el-icon>{{ username }}
                </el-button>
                <el-button color="#626aef" plain :icon="Histogram" />
                <el-button color="#626aef" plain :icon="SwitchButton" @click="logout"/>
            </el-button-group>

        </el-col>
   </el-row>
</template>

<script setup>
import {ref,reactive,onMounted} from 'vue'
import {get,post} from '@/myaxios'
import router from '@/router'
import {Edit,Histogram,SwitchButton} from '@element-plus/icons-vue'

const username = ref('')
const logout = ()=>{
    router.push('/login')
}

onMounted(()=>{
   
  //前端共享数据
  let loginUser = JSON.parse(sessionStorage.getItem('loginUser')   ) 
  username.value = loginUser.username

})

</script>

<style scoped>
.el-row{
    height: 96px;
    line-height: 96px;
    font-size: 44px;
    font-weight: 900;
    color: #666;
   
}
</style>